package com.poorstu.web.auditaction;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.DynaActionForm;

import com.common.base.web.BaseAction;
import com.poorstu.manager.LoadManager;
import com.poorstu.manager.LoginMeg;
import com.poorstu.model.AuditLoadMod;
import com.poorstu.model.LoginMod;

public class AuditLoadAction extends BaseAction {

	
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		
		try{
			
			DynaActionForm dyna=(DynaActionForm)form;
			int auditStatu=(Integer)dyna.get("auditStatu");
			String remark=(String)dyna.get("remark");
			int loadId=(Integer)dyna.get("loadId");
			LoadManager loadManager=(LoadManager)getBean("loadManager");
			loadManager.auditLoad(auditStatu, remark, loadId);
		
		return mapping.findForward("succ");
		}
		catch(Exception e){
			e.printStackTrace();
			return mapping.findForward("failure");
		}
	}
}
